]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
quickSettings: Bind the outer button's toggle-mode to the inner buttons
authorAndy Holmes <andrew.g.r.holmes@gmail.com>
Wed, 1 Mar 2023 20:10:57 +0000 (12:10 -0800)
committerMarge Bot <marge-bot@gnome.org>
Wed, 1 Mar 2023 20:17:07 +0000 (20:17 +0000)
When the `QuickMenuToggle` was a discrete button, it could be set to
toggle mode, but the inner buttons no longer reacts as expected.

Bind the `toggle-mode` property between the `QuickMenuToggle` and its
contents so they behave as single toggle when enabled.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2664>

js/ui/quickSettings.js

index d0dc2e996f601ae59f9ac6c181998267d18b5f37..8ba5ac4f42a58387461efaceed09bcc898d5dffc 100644 (file)
@@ -186,9 +186,13 @@ var QuickMenuToggle = GObject.registerClass({
         });
         this._box.add_child(this._menuButton);
 
+        this.bind_property('toggle-mode',
+            contents, 'toggle-mode',
+            GObject.BindingFlags.SYNC_CREATE);
         this.bind_property('checked',
             contents, 'checked',
-            GObject.BindingFlags.SYNC_CREATE);
+            GObject.BindingFlags.SYNC_CREATE |
+            GObject.BindingFlags.BIDIRECTIONAL);
         this.bind_property('title',
             contents, 'title',
             GObject.BindingFlags.SYNC_CREATE);